


def getName(srcStr):
    name = srcStr.split( )[8].split(',')[0]
    name1 = srcStr.split()
    str=name1[8].split(',')
    return str[0]
inname ='A pretty boy come in, the name is Patrick, level 194'
print(getName(inname))


# def getName(srcStr):
#     srcStr =srcStr.split(',')[1].split()[3]
#     return srcStr
# s ='A old lady come in, the name is Mary, level 94454' #定义变量
# print(getName(s))
#
#



# name = 'tim, liaogan,'
# print(name.find('i'))
# print(name.find('n',4))
# print(name.find(',',4))

#count 计数
# a = '123 456 789 123'
# print(a.count('123'))

# tel = input('输入手机号码')
# if tel.isdigit():
#     if len(tel) == 11:
#         if tel.startswith('187') or tel.startswith('139'):
#             print('中国移动用户')
#         elif tel.startswith('150') or tel.startswith('155'):
#             print('中国联通用户')
#         elif tel.startswith('133') or tel.startswith('120'):
#             print('中国电信用户')
#         else:
#             print('无该号段')
#     else:
#         print('手机号位数不足11位')
# else:
#     print('手机号里面有无效字符')\



# str2=['i','lke','play','football']
# ';'.join(str2)
# print(str2)

# str3 = 'abc bdc  nba'
# print(str3.replace('a','m'))
#
# str4 = 'china'
# print(str4.upper())
#
# str5 = 'CHINA'
# print(str5.lower())
#
# #前后空格
# str6 = '  name is tom    '
# print(str6.strip())
#
# #去前后空格+把中间空格改为空
# str7 ='  name is tom  '
# print(str7.strip().replace(' ',''))

# str1 = input('请输入学生信息')
# str1 = str1.split(';')
# for stuinfo in str1:
#     if stuinfo == '':
#         continue
#     # print(str1)
#     str1 = str1.split(',')
#     # print(str1[0],str1[1])
#     print('%-15s : %010d :' % (str1[0],int(str1)[0]))

